# Contributor: Sam Whited <sam@samwhited.com>
# Maintainer: Sam Whited <sam@samwhited.com>
pkgname=py3-slixmpp
_pkgname=slixmpp
pkgver=1.8.4
pkgrel=0
pkgdesc="A fork of the SleekXMPP XMPP library for async IO and Python 3.7+."
url="https://slixmpp.readthedocs.io/en/latest/"
arch="all"
license="MIT"
depends="python3 py3-cryptography py3-aiodns py3-aiohttp py3-emoji py3-defusedxml"
makedepends="
	cython
	libidn
	libidn-dev
	py3-gpep517
	py3-installer
	py3-setuptools
	py3-wheel
	python3-dev
	"
subpackages="$pkgname-pyc"
source="https://files.pythonhosted.org/packages/source/${_pkgname:0:1}/$_pkgname/$_pkgname-$pkgver.tar.gz"
builddir="$srcdir/$_pkgname-$pkgver"
options="!check" # Tests for this version always fail.

# secfixes:
#   1.8.3-r0:
#     - CVE-2022-45197

build() {
	gpep517 build-wheel \
		--wheel-dir .dist \
		--output-fd 3 3>&1 >&2
}

package() {
	python3 -m installer -d "$pkgdir" \
		.dist/slixmpp*.whl
	install -Dm644 LICENSE README.rst -t "$pkgdir"/usr/share/licenses/$pkgname
}

sha512sums="
afa82670e4cb2c904503a6ef652d3f2ecd59732a18eef05b85e0a55f15112685ecc1b50951b3f717a211d1c9069a4e7c65d913454426441f56688ff05a5c0921  slixmpp-1.8.4.tar.gz
"
